Graph server querying for managing social network information flow

ABSTRACT

An online social network is managed using one server for database management tasks and another server, preferably in a distributed configuration, for CPU-intensive computational tasks, such as finding a shortest path between two members or a degree of separation between two members. The additional server has a memory device containing relationship information between members of the online social network and carries out the CPU-intensive computational tasks using this memory device. With this configuration, the number of database lookups is decreased and processing speed is thereby increased.

RELATED APPLICATIONS

The present application is a continuation of U.S. patent application Ser. No. 10/854,054, filed May 26, 2004, and entitled “System and Method for Managing an Online Social Network,” which is incorporated by reference herein for all purposes.

BACKGROUND

The present invention generally relates to a system and method for managing an online social network, and more specifically, to a system and method for managing information exchange between members of an online social network.

Online social networking sites have been rapidly gaining in popularity, and operators of online social networking sites have been adding servers and switches to their infrastructure to keep up with the increasing demand. Keeping up with the increasing demand has, however, proved to be difficult for two reasons. First, online social networking sites are virally marketed, as current members actively solicit nonmembers to sign up and join the network, and as a result, its growth has been very rapid. Second, the load on the social networking site is dependent not only on the total number of members but also on the total number of relationships. Because a member typically has multiple relationships, this means that the load increase associated with each new member is much greater than typical.

SUMMARY

The present invention deals with the system load demands by improving the processing efficiencies of the online social networking site. The improvement in the processing efficiencies is achieved by providing one or more graph servers to be used in combination with the site's application server. The application server is configured to handle database management tasks, and the graph servers are configured to handle CPU-intensive computational tasks.

More specifically, the application server manages a database that contains member profile information and member relationship information. The graph servers keep track of how the members are socially connected to one another (hereinafter referred to as, “social network map”) in a dedicated memory device, and process and respond to queries from the application server using the social network map stored in the dedicated memory device. The social network map that is stored in the dedicated memory device of the graph servers is updated to reflect any changes to the member relationship information that are made in the database.

Because the present invention processes relationship information using a social network map that is stored in a dedicated memory device, the number of database lookups is decreased and an improvement in the processing speed is achieved. Depending on the number of relationships that are tracked, a dramatic improvement in the processing speed might be achieved with the present invention.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram that conceptually represents the relationships between members in a social network;

FIG. 2 is a block diagram illustrating the system for managing an online social network according to an embodiment of the present invention;

FIG. 3 is a sample adjacency list that is maintained by the graphs servers of the present invention;

FIG. 4 is a flow diagram illustrating the method for processing a request by one member to view the profile of another member in the system of FIG. 2;

FIG. 5 is a flow diagram illustrating the method for determining whether a member can be contacted by another member in the system of FIG. 2; and

FIG. 6 is a flow diagram illustrating the method for processing a search request in the system of FIG. 2.

DETAILED DESCRIPTION

A social network is generally defined by the relationships among groups of individuals, and may include relationships ranging from casual acquaintances to close familial bonds. A social network may be represented using a graph structure. Each node of the graph corresponds to a member of the social network. Edges connecting two nodes represent a relationship between two individuals. In addition, the degree of separation between any two nodes is defined as the minimum number of hops required to traverse the graph from one node to the other. A degree of separation between two members is a measure of relatedness between the two members.

FIG. 1 is a graph representation of a social network centered on a given individual (ME). Other members of this social network include A-U whose position, relative to ME's, is referred to by the degree of separation between ME and each other member. Friends of ME, which includes A, B, and C, are separated from ME by one degree of separation (1 d/s). A friend of a friend of ME is separated from ME by 2 d/s. As shown, D, E, F and G are each separated from ME by 2 d/s. A friend of a friend of a friend of ME is separated from ME by 3 d/s. FIG. 1 depicts all nodes separated from ME by more than 3 degrees of separation as belonging to the category ALL.

Degrees of separation in a social network are defined relative to an individual. For example, in ME's social network, H and ME are separated by 2 d/s, whereas in G's social network, H and G are separated by only 1 d/s. Accordingly, each individual will have their own set of first, second and third degree relationships.

As those skilled in the art understand, an individual's social network may be extended to include nodes to an Nth degree of separation. As the number of degrees increases beyond three, however, the number of nodes typically grows at an explosive rate and quickly begins to mirror the ALL set.

FIG. 2 is a block diagram illustrating a system for managing an online social network. As shown, FIG. 2 illustrates a computer system 100, including an application server 200 and distributed graph servers 300. The computer system 100 is connected to a network 400, e.g., the Internet, and accessible over the network by a plurality of computers, which are collectively designated as 500.

The application server 200 manages a member database 210, a relationship database 220 and a search database 230. The member database 210 contains profile information for each of the members in the online social network managed by the computer system 100. The profile information may include, among other things: a unique member identifier, name, age, gender, location, hometown, a pointer to an image file, listing of interests, attributes, etc. The profile information also includes VISIBILITY and CONTACTABILITY settings, the uses of which are described below in connection with FIGS. 4 and 5.

The relationship database 220 stores member relationship information in the following format: (MemberID_1, MemberID_2, Time, Add/Delete). MemberID_1 and MemberID_2 identify the two members whose relationship is defined by this input. Time is a variable corresponding to the time stamp of this input. Add/Delete is a variable indicating whether the friendship between MemberID_1 and MemberID_2 is to be added or deleted.

In addition, the contents of the member database 210 are indexed and optimized for search, and stored in the search database 230. The member database 210, the relationship database 220, and the search database 230 are updated to reflect inputs of new member information and edits of existing member information that are made through the computers 500.

The member database 210, the relationship database 220, and the search database 230 are depicted separately in the block diagram of FIG. 2 to illustrate that each performs a different function. The databases 210, 220, 230 may each represent a different database system, module, or software; or any two of the three or all three may be parts of the same database system, module, or software.

The application server 200 also manages the information exchange requests that it receives from the remote computers 500. The information exchange requests may be a request to view a member's profile (FIG. 4), a request to send messages to a member (FIG. 5), or a search request (FIG. 6). The application server 200 relies on the distributed graph servers 300 to process certain CPU-intensive tasks that are part of the information exchange request. The graph servers 300 receive a query from the application server 200, process the query and return the query results to the application server 200.

The graph servers 300 have a dedicated memory device 310, such as a random access memory (RAM), in which an adjacency list that reflects the member relationship information is stored. A sample adjacency list that reflects the social network map of FIG. 1 is shown in FIG. 3. A list item is generated for each member and contains a member identifier for that member and member identifier(s) corresponding to friend(s) of that member. As an alternative to the adjacency list, an adjacency matrix or any other graph data structure may be used.

The graph servers 300, on a fixed interval, e.g., every five minutes, check the relationship database 220 for any incremental changes to the member relationship information. If there is, e.g., if (current time—5 minutes) is less than or equal to the time stamp corresponding to an entry in the relationship database 220, the adjacency list stored in the dedicated memory device 510 is updated to reflect such incremental change. If a friendship is to be added, the adjacency list item for MemberID_1 is amended to add MemberID_2 and the adjacency list item for MemberID_2 is amended to add MemberID_1. If a friendship is to be deleted, the adjacency list item for MemberID_1 is amended to delete MemberID_2 and the adjacency list item for MemberID_2 is amended to delete MemberID_1. Alternatively, the adjacency list can be updated in real time, i.e., synchronously with the updates to the relationship database 220.

The queries processed by the graph servers 300 include:

-   -   List_of Members (M1, N d/s), which returns a list of member         identifiers of all members who are exactly N d/s from member M1;     -   No_of_Members (M1, N d/s), which returns a raw number indicating         the number of members who are exactly N d/s from member M1;     -   Get_Network (M1, N d/s), which returns a list of member         identifiers of all members that are within N d/s from member M1;     -   Shortest Path (M1, M2), which returns the shortest path, if any,         between member M1 and member M2 (the shortest path is displayed         in the form of member identifiers of those members disposed in         the shortest path between member M1 and member M2); and     -   Are_Connected? (M1, M2, degrees), which returns the degree of         separation corresponding to the shortest path between member M1         and member M2, if the two are connected. If the two are not         connected, an error code indicating that the two members are not         connected is returned.

For the calculation of the shortest path in the queries listed above, any of the shortest path algorithms for a node network defined by an adjacency list may be used, e.g., breadth first search algorithm. The algorithms for carrying out other calculations that are necessary to process the queries listed above are programmed using conventional techniques.

In FIG. 2, a plurality of distributed graph servers 300 are depicted, and is preferred over a single graph server because the distributed structure permits resources to be shared. However, the present invention may also be practiced with a single graph server.

The application server 200 and the graphs servers 300 are depicted separately in the block diagram of FIG. 2 to illustrate that the two are performing separate processes. The application server 200 and the graphs servers 300 may be housed within a single physical structure, or they may be parts of a single processor that is programmed to carry out their separate processes in parallel.

FIG. 4 is a flow diagram illustrating the method for processing a request by one member (e.g., M1) to view the profile of another member (e.g., M2) in the system of FIG. 2. In Step 610, the application server 200 receives a request by member M1 to view the profile of member M2. As an example, this happens when member M1 clicks on a hyperlink associated with member M2. The full profile of member M2 will be displayed if the d/s between M1 and M2 is less than or equal to the VISIBILITY setting set by member M2 or if the VISIBILITY setting set by member M2 is ALL. (VISIBILITY setting may be set at 1, 2, 3 or ALL.) Otherwise, only the mini-profile of member M2 will be displayed. In Step 620, the application server 200 retrieves M2's VISIBILITY setting from the member database 210. If M2's VISIBILITY setting is ALL, the full profile of M2 will be transmitted to M1 for display at M1's computer (Steps 630 and 640). If not, the application server 200 sends the Are_Connected? query to the graph servers 300 to determine the d/s between member M1 and member M2 (Steps 630 and 650). The graph servers 300 execute this query and return the d/s that it computed to the application server 200. If the computed d/s is greater than the VISIBILITY setting or if member M1 and member M2 are not connected, the mini-profile of member M2 and a message indicating that member M2's full profile can only be viewed by members in his or her personal network is transmitted to M1 for display at M1's computer (Steps 660 and 670). Otherwise, the full profile of member M2 is transmitted to M1 for display at M1's computer (Steps 660 and 640).

FIG. 5 is a flow diagram illustrating the method for determining whether a member can be contacted by another member in the system of FIG. 2. In the example given herein, it is assumed that member M1 is attempting to send a message to member M2. In Step 710, the application server 200 retrieves the CONTACTABILITY setting of member M2. (CONTACTABILITY setting may beset as 1, 2, 3 or ALL.) If M2's CONTACTABILITY setting is ALL, this means that member M2 is permitting contact from anyone, and consequently, when member M1 views member M2's profile, a “Send Message” hyperlink will appear through which member M1 will be able to send messages to member M2 (Steps 720 and 730). If M2's CONTACTABILITY setting is not set to ALL, the application server 200 sends the Are_Connected? query to the graph servers 300 to determine the d/s between member M1 and member M2 (Steps 720 and 740). The graph servers 300 execute this query and return the d/s that it computed to the application server 200. If the computed d/s is greater than the CONTACTABILITY setting or if member M1 and member M2 are not connected, this means that member M2 is not permitting contact from member M1 and the “Send Message” hyperlink will not be displayed when member M1 views member M2's profile (Steps 750 and 760). If the computed d/s is less than or equal to the CONTACTABILITY setting, this means that member M2 is permitting contact from member M1, and consequently, when member M1 views M2's profile, a “Send Message” hyperlink will appear through which member M2 will be able to send messages to member M1 (Steps 750 and 730).

FIG. 6 is a flow diagram illustrating the method for processing a search request in the system of FIG. 2. In Step 810, the application server 200 receives a search query input by member M1. The search query is divided into two parts. The first part specifies search terms for pre-selected categories such as gender, age, interests and location. The second part specifies a d/s setting, which may beset at 1, 2, 3 or ALL. For example, the search query may be: [gender (female), age (less than 30), d/s (at most 2)]. The first part of this search query is [gender(female), age (less than 30)] and the second part of this search query is [d/s (at most 2)]. In Step 820, the application server 200 issues the first part of the search query to the search database 230 to obtain member identifiers for those members whose profiles meet the specified criteria. In Step 830, the application server 200 issues a Get_Network query to the graph servers 300 to obtain a list of member identifiers of all members that are within the d/s specified in the second part of the search query. The application server 200 merges the results from the search database 230 and the graph servers 300 (Step 840), and transmits the merged results to member M1 (Step 850). After the merged results are delivered to member M1, the member may click on any of the results to view that member's profile and, if the “Send Message” hyperlink is displayed, attempt to send a message to that member through that hyperlink.

While particular embodiments according to the invention have been illustrated and described above, it will be clear that the invention can take a variety of forms and embodiments within the scope of the appended claims. 

What is claimed:
 1. A computer-implemented method comprising, by one or more processors associated with one or more computing systems: receiving, from a client device of a first user of an online social network, a request for a user profile of a second user of the online social network; retrieving, using the one or more processors and in response to the request, information from a user profile database, the information comprising user profile data of the second user, wherein a social graph representing the online social network comprises a plurality of nodes and edges, each node representing one of a plurality of users of the online social network, each edge representing a relationship between two of the plurality of users and establishing a degree of separation between each of the plurality of users based on the social graph, wherein the first user corresponds to a first node of the plurality of nodes and the second user corresponds to a second node of the plurality of nodes; determining, using the one or more processors, a profile format for the user profile data of the second user based on a visibility preference of the second user and a degree of separation between the first node and the second node within the social graph, the visibility preference of the second user being included with the information retrieved from the user profile database, and the visibility preference of the second user indicating a specified degree of separation between the second node and another node at which the user is permitted to view the user profile data of the second user in a full profile format; and sending, to the client device for display to the first user, information representing the user profile data of the second user, wherein: if the degree of separation between the first node and the second node is less than or equal to the specified degree of separation indicated in the visibility preference of the second user, then sending the information using a full profile format; and if the degree of separation between the first node and the second node is greater than the specified degree of separation indicated in the visibility preference of the second user, then sending the information using a mini profile format.
 2. The method of claim 1, wherein the request comprises an identifier for the second user.
 3. The method of claim 1, wherein the specified degree of separation of the visibility preference is 1, 2, 3, or All degrees of separation.
 4. The method of claim 1, wherein the full profile format permits the first user to view an entirety of the user profile data of the second user.
 5. The method of claim 1, wherein the mini profile format permits the first user to view only a limited portion of the user profile data of the second user.
 6. One or more machine-readable non-transitory storage media embodying software that is operable when executed by one or more processors associated with one or more computer systems to: receive, from a client device of a first user of an online social network, a request for a user profile of a second user of the online social network; retrieve, using the one or more processors and in response to the request, information from a user profile database, the information comprising user profile data of the second user, wherein a social graph representing the online social network comprises a plurality of nodes and edges, each node representing one of a plurality of users of the online social network, each edge representing a relationship between two of the plurality of users and establishing a degree of separation between each of the plurality of users based on the social graph, wherein the first user corresponds to a first node of the plurality of nodes and the second user corresponds to a second node of the plurality of nodes; determine, using the one or more processors, a profile format for the user profile data of the second user based on a visibility preference of the second user and a degree of separation between the first node and the second node within the social graph, the visibility preference of the second user being included with the information retrieved from the user profile database, and the visibility preference of the second user indicating a specified degree of separation between the second node and another node at which the user is permitted to view the user profile data of the second user in a full profile format; and send, to the client device for display to the first user, information representing the user profile data of the second user, wherein: if the degree of separation between the first node and the second node is less than or equal to the specified degree of separation indicated in the visibility preference of the second user, then send the information using a full profile format; and if the degree of separation between the first node and the second node is greater than the specified degree of separation indicated in the visibility preference of the second user, then send the information using a mini profile format.
 7. The one or more machine-readable non-transitory storage media of claim 6, wherein the mini profile format permits the first user to view only a limited portion of the user profile data of the second user.
 8. The one or more machine-readable non-transitory storage media of claim 6, wherein the full profile format permits the first user to view an entirety of the user profile data of the second user.
 9. A system comprising: a user profile database; and an application server comprising: one or more computing systems; and one or more non-transitory machine-readable storage media comprising, by one or more processors associated with one or more computing systems, software for causing the one or more computing systems to execute instructions to: receive, from a client device of a first user of an online social network, a request for a user profile of a second user of the online social network; retrieve, using the one or more processors and in response to the request, information from a user profile database, the information comprising user profile data of the second user, wherein a social graph representing the online social network comprises a plurality of nodes and edges, each node representing one of a plurality of users of the online social network, each edge representing a relationship between two of the plurality of users and establishing a degree of separation between each of the plurality of users based on the social graph, wherein the first user corresponds to a first node of the plurality of nodes and the second user corresponds to a second node of the plurality of nodes; determine, using the one or more processors, a profile format for the user profile data of the second user based on a visibility preference of the second user and a degree of separation between the first node and the second node within the social graph, the visibility preference of the second user being included with the information retrieved from the user profile database, and the visibility preference of the second user indicating a specified degree of separation between the second node and another node at which the user is permitted to view the user profile data of the second user in a full profile format; and send, to the client device for display to the first user, information representing the user profile data of the second user, wherein: if the degree of separation between the first node and the second node is less than or equal to the specified degree of separation indicated in the visibility preference of the second user, then sending the information using a full profile format; and if the degree of separation between the first node and the second node is greater than the specified degree of separation indicated in the visibility preference of the second user, then sending the information using a mini profile format.
 10. The system of claim 9, wherein the request comprises an identifier for the second user.
 11. The system of claim 9, wherein the specified degree of separation of the visibility preference is 1, 2, 3, or All degrees of separation.
 12. The system of claim 9, wherein the full profile format permits the first user to view an entirety of the user profile data of the second user.
 13. The system of claim 9, wherein the one or more non-transitory machine-readable storage media of the application server further comprises instructions to compare the degree of separation between the first node and the second node to the degree of separation indicated in the visibility preference of the second user when the application server determines that the visibility preference is not set to All degrees of separation.
 14. The system of claim 13, wherein the mini profile format permits the first user to view only a limited portion of the user profile data of the second user.
 15. The system of claim 14, wherein the one or more non-transitory machine-readable storage media of the application server further comprises instructions to set the profile format to transmit the information, based on the full profile format, when the degree of separation between the first node and the second node is less than or equal to the degree of separation indicated in the visibility preference of the second user.
 16. The method of claim 1, wherein determining the profile format for the user profile data of the second user comprises: determining whether the visibility preference of the second user is set to some value other than All degrees of separation; generating, in response to determining that the visibility preference of the second user is set to some value other than All degrees of separation, a request for the degree of separation between the first user and the second user; receiving, at a graph server configured to manage the social graph, the request for the degree of separation between the first user and the second user; accessing, by the graph server and in response to receiving the request for the degree of separation between the first user and the second user, the social graph; determining, by the graph server, the degree of separation between the first user and the second user by computing the fewest number of edges in the social graph between the first node and the second node; receiving the degree of separation between the first user and the second user determined by the graph server; and setting the profile format for viewing the user profile data of the second user based on a comparison of the degree of separation indicated in the visibility preference and the received degree of separation between the first user and the second user.
 17. The method of claim 16, wherein the social graph represents a plurality of entries stored in a relationship database for the online social network, each entry of the plurality of entries indicating a relationship between at least two users of the plurality of users of the online social network, wherein the one or more computing systems and the one or more processors associated with the one or more computing systems are components of an application server configured to manage the user profile database and a relationship database, wherein the user profile database stores user profile data for each of the plurality of users of the online social network, wherein the social graph is stored in a dedicated memory device separate from the user profile database and the relationship database, and wherein the graph server, which is separate from the application server, determines the degree of separation between the first user and the second user without accessing the relationship database.
 18. The one or more machine-readable non-transitory storage media of claim 6, wherein the software for determining the profile format for the user profile data of the second user is operable when executed by one or more processors associated with one or more computer systems to: determine whether the visibility preference of the second user is set to some value other than All degrees of separation; generate, in response to determining that the visibility preference of the second user is set to some value other than All degrees of separation, a request for the degree of separation between the first user and the second user; control a graph server, which is configured to manage the social graph, to: receive the request for the degree of separation between the first user and the second user; access, in response to receiving the request for the degree of separation between the first user and the second user, the social graph; and determine the degree of separation between the first user and the second user by computing the fewest number of edges in the social graph between a node representing the first user and a node representing the second user; receive the degree of separation between the first user and the second user determined by the graph server; and set the profile format for viewing the user profile data of the second user based on a comparison of the degree of separation indicated in the visibility preference and the received degree of separation between the first user and the second user.
 19. The system of claim 9, wherein the system further comprises a graph server, wherein the instruction to determine the profile format for the user profile data of the second user comprises instructions for the one or more computing systems to: determine whether the visibility preference of the second user is set to some value other than All degrees of separation; generate, in response to determining that the visibility preference of the second user is set to some value other than All degrees of separation, a request for the degree of separation between the first user and the second user; receive the degree of separation between the first user and the second user from the graph server; and set the profile format for viewing the user profile data of the second user based on a comparison of the degree of separation indicated in the visibility preference and the received degree of separation between the first user and the second user, wherein the graph server comprises: a dedicated memory device, the dedicated memory device storing the social graph and being separate from the user profile database; a processor; and one or more non-transitory machine-readable storage media comprising software for causing the processor to execute instructions to: receive the request for the degree of separation between the first user and the second user; access, in response to receiving the request for the degree of separation between the first user and the second user, the social graph; and determine the degree of separation between the first user and the second user by computing the fewest number of edges in the social graph between a node representing the first user and a node representing the second user.
 20. The method of claim 1, wherein if no path connects the first node to the second node within the social graph, then the degree of separation between the first node and the second node is greater than the specified degree of separation in the visibility preference. 